home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_7 / issue_07 / printers / With < prev   
Encoding:
Text File  |  1994-02-10  |  14.8 KB  |  280 lines

  1. Notes on setting up !Printers
  2.  
  3. James Munday
  4.  
  5. Formfeeds, DeskEdit and Auto Tear-Off
  6.  
  7. I have very recently up-dated to RISC OS 3.1, and I agree with Tim Nicholson (Vol 6.10 p43) as to 
  8. the power of the new !Printers. In particular the !PrintEdit utility is basically very simple to use 
  9. once you get used to the steps involved.
  10.  
  11. I make a lot of use of !DeskEdit for listing programs, using A4 fanfold paper. I quickly experienced 
  12. the irritation of unwanted form-feeds. This is well known, and the fudge of setting a very large page 
  13. height using the !Printers Page Sizes option worked as expected. However the Auto Tear-off on my 
  14. FX-1050 printer did not work, and this is particularly irritating with the 1050 since the cutting edge 
  15. is a long way from the print head. Both problems are easily cured by small alterations to, in my 
  16. case, the FX-85 printer definition file. This can be done using !PrintEdit, but we do have to be 
  17. careful about saving modified definition files. It is quite easy to not actually save the alterations that 
  18. are made! − and this might explain the problems that Mick Day (Vol 6.12 pp57) experienced.
  19.  
  20. Editors and Page Formats
  21.  
  22. In what follows I imply no critiscism of editors such as !Edit. On the contrary, the !Edit application 
  23. in RISC OS3 is very much improved over its predecesser, and very useful for smaller tasks.
  24.  
  25. But !Edit has no facility for page formatting, and instead relies upon !Printers for this.
  26.  
  27. There is nothing wrong with this − it is what !Printers is designed to cope with. Nevertheless, for 
  28. some more complicated tasks, I prefer to use an editor such as !DeskEdit, which does have margin 
  29. and page formatting as options within the editor.
  30.  
  31. When printing is innitiated from within !DeskEdit say, then page formatting is done with suitable 
  32. spaces and linefeeds in the output text, and as such does not rely upon the page format facilities of 
  33. !Printers. It does mean though that there can be an inconsistency among editors in matters of page 
  34. formatting, among other things.
  35.  
  36. The solution within !Printers is that of easily configurable printer definition files, and there is 
  37. nothing wrong with having as many as we need for special purposes.
  38.  
  39. Indeed, this is a beauty of !Printers, and the way in which complete device independence is 
  40. maintained so far as the printer and applications software are concerned.
  41.  
  42. Page Length and formfeeds
  43.  
  44. The required page length is set using the !Printers Page Sizes option from the Printers Icon menu, 
  45. for the chosen paper format.
  46.  
  47. This is used by !Printers, to configure the printer form length at the start of a document.
  48.  
  49. This should be done by !Printers and not by applications − otherwise we may lose device 
  50. independence.
  51.  
  52. Then, during printing, !Printers will send a ‘logical’ formfeed in accordance with the page length 
  53. and margin settings. However, the ‘physical’ code for the formfeed is configurable in the printer 
  54. definition file. The simple fudge for Editors such as !DeskEdit, is just to set the !Printers page 
  55. length so large that a formfeed is never actually sent.
  56.  
  57. This works well enough with simple printers, but for those with auto tear-off it is less than ideal − 
  58. this is because the printer is not configured with a suitable form length.
  59.  
  60. A better solution is to reconfigure the ‘physical’ formfeed code in the printer definition file, and 
  61. subsequently to set the correct page length (with zero margins) in the !Printers page size.
  62.  
  63. Auto Tear-Offs and Printer Resets
  64.  
  65. Apart from needing a correct form length setting, a printer auto tear-off cannot work if the printer is 
  66. reset at the end of a document, and most of the available printer definitions have a reset code as an 
  67. end of job requirement. Incidentally, it is the same with 1stWord+ Pdrivers − so with the 
  68. Archemedes, it is possible for us beginners to never see what auto tear-off is or does!.
  69.  
  70. Anyway, the answer is to alter the end of job definitions in the printer definition file.
  71.  
  72. Printer Definitions and !PrintEdit
  73.  
  74. At risk of being a little long winded, I will go through the steps of modifying a printer definition file 
  75. using !PrintEdit. As I have said, it is basically very simple once you have done it − but a step by 
  76. step guide may help other beginners to avoid some of the grief and despair that I experienced 
  77. initially!. I will deal with matters affecting auto tear-off and formfeeds.
  78.  
  79. See also, Tim Nicholson’s article for other general points and aspects. 
  80.  
  81. Firstly double-click on !PrintEdit to bring up the ‘Printer Definition Editor’ window.
  82.  
  83. Now from the Printers directory in APPS2, drag a suitable definition file into the window ( in my 
  84. case Epson FX-85).
  85.  
  86. If the text modes section is greyed out then click on the small right hand boxes to bring them up.
  87.  
  88. Then select on , say, ‘Text-No Highlights’ to bring up a ‘Text-No Highlights’ window.
  89.  
  90. The edit now requires three small steps:-
  91.  
  92. (1) To correct the formfeed problem, go to ‘Do FormFeed:’ and delete all code (in my case just 12).
  93.  
  94. (2) To correct the reset problem, go to ‘Text End of Job:’ and delete the reset code (in my case 
  95. 27,“@”), and replace this with some suitable termination that does not involve a reset. For example, 
  96. for the FX-85, 27,“!”,0,27,“x”,0 puts the printer back to a basic draft standard mode configuration, 
  97. and is suitable for page formatted printing that is innitiated from within an application such as 
  98. !DeskEdit. But see a later paragraph for more detail of suitable termination code requirements.
  99.  
  100. (3) Finally, and most importantly, scroll to the top of the page and click on the OK icon before 
  101. closing the ‘Text-No Highlights’ window.
  102.  
  103. Failure to do this would mean that the changes will not be implemented.
  104.  
  105.  Now, these three steps can be repeated for Text Draft and NLQ highlight entries as required.
  106.  
  107. To complete the edit, change the names at Printer Type: and Printer Name: entries in the Printer 
  108. Definition Editor window. (I chose ‘FX-85 DeskEdit’, and ‘FX-85D’ for these). Lastly, click on 
  109. Menu in the Printer Definition Editor window and save the modified file under a different name (eg, 
  110. I chose FX-85D instead of the original FX-85).
  111.  
  112. A useful hint at this stage is to double-click on !PrintEdit again and drag your modified file into it.
  113.  
  114. You can check that you have actually managed to make the required alterations!.
  115.  
  116. Graphics Pages
  117.  
  118. Apart from the paper offsets, which Tim Nicholson has dealt with in detail in his article, the only 
  119. edits to the graphics pages that I have done have been concerned with auto tear-off. For this there 
  120. are a few further steps to take before saving a modified printer definition file. Working from the 
  121. Printer Definition Editor window, these steps are:-
  122.  
  123. (4) Click on the arrow icon to the right of ‘Graphics modes:’ to bring up a ‘Graphics’ menu. Then 
  124. click on a resolution of interest to bring up a ‘Graphics Mode’ window.
  125.  
  126. (5) In the ‘Graphics Mode’ window scroll down to a ‘Page end:’ entry and delete the reset code 
  127. there. Replace this with a similar termination code as for step (2) above. However, we need to 
  128. include codes to reset the line space, otherwise a text page following a Graphics page, will not print 
  129. properly. For some reason, the code order is important if the auto tear-off is not to be disabled − I 
  130. used 27,“2”,13,27,“!”,0,27,“x”,0 for my FX-1050.
  131.  
  132.  (6) Again, and most importantly as step (3) above, scroll to the top of the page and click on the OK 
  133. icon before closing the ‘Graphics Mode’ window.
  134.  
  135. As before, failure to do this would mean that the changes will not be implemented.
  136.  
  137. Unfortunately these steps must be repeated for all of the resolutions in the ‘Graphics’ menu, and 
  138. this is a bit tedious if you have retained all of the available resolutions. Well, I said it was easy − I 
  139. didn’t say it was fun.
  140.  
  141. More on Termination Codes for Text Modes
  142.  
  143. There are a number of ways in which we can print ‘text’ files, and I mean this in general fashion 
  144. and not a specific reference to file types.
  145.  
  146. Broadly we can print ‘Direct’ by dragging a file to the !Printers icon, or it may be ‘Indirect’ by 
  147. innitiating printing from within applications such as !Edit, or !DeskEdit. With RISC OS3.1 we can 
  148. also print !1stWord+ files ‘direct’. None of this matters unless we are concerned with enabing auto 
  149. tear-off, by changing Reset codes to some other termination. Again, broadly there are two cases to 
  150. be considered. Firstly text that is effectively ‘Simple’, and text that is effectively ‘Page formatted’.
  151.  
  152. Files from !Edit are ‘Simple’ whether or not they are printed ‘Direct’ or ‘Indirect’.
  153.  
  154. Files from !DeskEdit are ‘Simple’ if they are ‘Direct’, but ‘Page formatted’ if they are ‘Indirect’.
  155.  
  156. Files from !1stWord+ are treated differently depending upon whether or not the !1stWord+ 
  157. directory has been seen or not. For the ‘Indirect’ case, then the !1stWord+ Pdrivers will be used, 
  158. and this is of no interest here. Equally, if the !1stWord+ directory has been seen, then the ‘Direct’ 
  159. case will also use the 1stWord+ Pdrivers.
  160.  
  161. But otherwise, ‘Direct’ !1stWord+ files appear as ‘Simple’ to !Printers.
  162.  
  163. From this we can see that ‘Indirect’ !DeskEdit files are really an odd-man-out. As I have said at step 
  164. (2) above, a termination code 27,“!”,27,“x”,0
  165.  
  166. is suitable for ‘Indirect’ !DeskEdit files. But for other cases, in my experience, we need also to add 
  167. a formfeed code − eg for Epson FX-85, we would use 27,“!”,27,“x”,0,12
  168.  
  169. as the termination. For me at least, this leads to a requirement for two Printer Definition files for my 
  170. FX-1050. One for ‘Indirect’ !DeskEdit, and one for everything else.
  171.  
  172. But either of them can be used for graphics (Strictly, I only know about !Draw files for sure).
  173.  
  174. Customising Paper Sizes
  175.  
  176. If we load !Printers and then click menu on the Printers Icon, then the ‘Edit paper sizes...’, ‘Printer 
  177. control...’, and ‘Save choices’ menu entries can be used to configure the page formats for each 
  178. printer definition that is loaded. In particular, we can use ‘Edit paper sizes...’ to customise a page 
  179. format for a particular definition.
  180.  
  181. For example, I have two printer definitions installed in !Printers.
  182.  
  183. Now if I use just just one paper size, say ‘A4 (generic DP)’ then I would be continually using the 
  184. ‘Edit paper sizes...’ option to change text margins.
  185.  
  186. Instead, it is much nicer to define a new paper size for, in my case, say the !DeskEdit definition − 
  187. particularly since this only takes up a few bytes of store.
  188.  
  189. I will go through the steps for doing this, because I did not find the User Guide to be all that clear 
  190. about it. These steps are:-
  191.  
  192. (1) Click menu on the !Printers icon to bring up a ‘Printers’ menu.
  193.  
  194. Now click on ‘Edit paper sizes...’ to bring up a ‘Paper size’ window.
  195.  
  196. Next, click on the arrow icon to the right of the ‘Paper size name:’ entry, to bring up a menu of 
  197. Paper sizes.
  198.  
  199. (2) From the ‘Paper sizes’ menu click on a suitable paper size, in my case say ‘A4 (generic DP)’, to 
  200. bring up these details in the ‘Paper sizes’ window.
  201.  
  202. (3) Now to define a new paper size, we must change the name at the ‘Paper size name:’ entry − I 
  203. chose ‘A4 (DeskEdit DP)’ − and alter the other entries as required.
  204.  
  205. In my case it was only those at ‘Text margins’- where I put the ‘Top:’, ‘Left:’, “Bottom:‘ and 
  206. ’Right:‘ settings to zero, while making sure that the ’Height:‘ setting was correct at 70.
  207.  
  208. (4) Finally click on the OK icon at the bottom right of the ‘Paper size’ window, to save the new 
  209. paper size. (The User Guide is a little confusing here since on pp72 it show a ‘Save settings’ icon − 
  210. I do not have this in my Version 0.33 of !Printers).
  211.  
  212. Now if you were to repeat step (1) above, you should see that the new paper size appears in the 
  213. ‘Paper sizes’ menu.
  214.  
  215. (In detail if you were also to look inside the !Printers directory, you would also see a new file 
  216. ‘PaperRW’, which contains the details of the new paper size). At this stage, the final steps to 
  217. configure a printer definition are:-
  218.  
  219. (5) Again click menu on the Printers Icon, and this time click on ‘Printer control...’ to bring up a 
  220. ‘Printer control’ window. Now click menu on the required printer definition − in my case ‘FX-85 
  221. DeskEdit’, to bring up a ‘Printers’ menu.
  222.  
  223. From this select the ‘Configure...’ entry, to bring up a ‘Bit image printer configuration’ window.
  224.  
  225. Now click on the arrow icon to the right of ‘Paper:’ to bring up a ‘Paper sizes’ menu, and click on 
  226. the new paper size -ie in my case ‘A4 (DeskEdit DP)’.
  227.  
  228. Check the Printer and Text printing options as required, and end by clicking on the OK icon.
  229.  
  230. (6) Finally, once more click menu on the Printers Icon, and this time select ‘Save choices’.
  231.  
  232. In this sort of way, we can have any number of printer definitions, all with their own page set-ups, 
  233. and this is very convenient. Only one definition at a time need be active, and if we ‘Save choices’ 
  234. for this then this will be the default when !Printers is loaded.
  235.  
  236. Loading Modified Definitions
  237.  
  238. Tim Nickolson’s warning about loading modified definitions into !printers is a point well made.
  239.  
  240. !Printers can be very reluctant to give up an old definition, even though we think we have removed 
  241. it. As Tim Nicholson says, it is desireable to at least change the ‘Printer type:’ name of a modified 
  242. definition file before you save it.
  243.  
  244. Otherwise, when you subsequently drag it into the ‘Printer control’ window, !Printers may still load 
  245. the unmodified definition.
  246.  
  247. The name change is good practice anyway, because you can then see straight away that it is indeed 
  248. the modified file that has been loaded into !Printers.
  249.  
  250.  Some precautionary steps that I have adopted are as follows − but first remember to keep a back-up 
  251. of your existing !printers, and work with a copy until everything is all tested.
  252.  
  253. (1) Load !Printers in the usual way, and select ‘Printer control...’ from the !Printers icon menu.
  254.  
  255. Then from the ‘Printer control’ window select menu on any existing definitions, and either 
  256. ‘Remove’ them if they are to be modified, or make them ‘Inactive’ otherwise.
  257.  
  258. (2) Next, from the !Printers icon menu select ‘Save choices’ and ‘Quit’.
  259.  
  260. (3) Now re-load !Printers, and you should be able to drag modified definitions into the ‘Printer 
  261. control’ window, and configure them with no ensuing troubles, even if the ‘Printer type:’ name has 
  262. not been changed.
  263.  
  264. It is arguable whether or not these precautionary steps are really necessary for just loading a 
  265. modified definition file, but they may save a lot of trouble if you happen to delete old definition 
  266. files or customised page sizes, or if you wish to keep the same ‘Printer type:’ name. At one time I 
  267. got so fouled up that I could not even load !Printers anymore, without all sorts of error messages 
  268. coming up.
  269.  
  270. In Conclusion
  271.  
  272. In retrospect this does all seem to be trivial and long winded! But I did not find it at all easy to sort 
  273. out when I first started.
  274.  
  275. If these notes are helpful to other beginners, then they may have served some useful purpose.
  276.  
  277. Auto tear-off may well be a bit of a non-problem. I do not know how many printers have it. But the 
  278. approach that is outlined, is in general good for almost any alterations that are needed to printer 
  279. definition files.
  280.